3.135 \(\int (a+b \tan ^{-1}(\frac{c}{x})) \, dx\)

Optimal. Leaf size=27 \[ a x+\frac{1}{2} b c \log \left (c^2+x^2\right )+b x \tan ^{-1}\left (\frac{c}{x}\right ) \]

[Out]

a*x + b*x*ArcTan[c/x] + (b*c*Log[c^2 + x^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0116355, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {5027, 263, 260} \[ a x+\frac{1}{2} b c \log \left (c^2+x^2\right )+b x \tan ^{-1}\left (\frac{c}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTan[c/x],x]

[Out]

a*x + b*x*ArcTan[c/x] + (b*c*Log[c^2 + x^2])/2

Rule 5027

Int[ArcTan[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTan[c*x^n], x] - Dist[c*n, Int[x^n/(1 + c^2*x^(2*n)), x],
x] /; FreeQ[{c, n}, x]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right ) \, dx &=a x+b \int \tan ^{-1}\left (\frac{c}{x}\right ) \, dx\\ &=a x+b x \tan ^{-1}\left (\frac{c}{x}\right )+(b c) \int \frac{1}{\left (1+\frac{c^2}{x^2}\right ) x} \, dx\\ &=a x+b x \tan ^{-1}\left (\frac{c}{x}\right )+(b c) \int \frac{x}{c^2+x^2} \, dx\\ &=a x+b x \tan ^{-1}\left (\frac{c}{x}\right )+\frac{1}{2} b c \log \left (c^2+x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.002662, size = 27, normalized size = 1. \[ a x+\frac{1}{2} b c \log \left (c^2+x^2\right )+b x \tan ^{-1}\left (\frac{c}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTan[c/x],x]

[Out]

a*x + b*x*ArcTan[c/x] + (b*c*Log[c^2 + x^2])/2

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 38, normalized size = 1.4 \begin{align*} ax+bx\arctan \left ({\frac{c}{x}} \right ) +{\frac{bc}{2}\ln \left ( 1+{\frac{{c}^{2}}{{x}^{2}}} \right ) }-bc\ln \left ({\frac{c}{x}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctan(c/x),x)

[Out]

a*x+b*x*arctan(c/x)+1/2*b*c*ln(1+c^2/x^2)-b*c*ln(c/x)

________________________________________________________________________________________

Maxima [A]  time = 0.987169, size = 36, normalized size = 1.33 \begin{align*} \frac{1}{2} \,{\left (2 \, x \arctan \left (\frac{c}{x}\right ) + c \log \left (c^{2} + x^{2}\right )\right )} b + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctan(c/x),x, algorithm="maxima")

[Out]

1/2*(2*x*arctan(c/x) + c*log(c^2 + x^2))*b + a*x

________________________________________________________________________________________

Fricas [A]  time = 2.12627, size = 65, normalized size = 2.41 \begin{align*} b x \arctan \left (\frac{c}{x}\right ) + \frac{1}{2} \, b c \log \left (c^{2} + x^{2}\right ) + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctan(c/x),x, algorithm="fricas")

[Out]

b*x*arctan(c/x) + 1/2*b*c*log(c^2 + x^2) + a*x

________________________________________________________________________________________

Sympy [A]  time = 0.220325, size = 22, normalized size = 0.81 \begin{align*} a x + b \left (\frac{c \log{\left (c^{2} + x^{2} \right )}}{2} + x \operatorname{atan}{\left (\frac{c}{x} \right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atan(c/x),x)

[Out]

a*x + b*(c*log(c**2 + x**2)/2 + x*atan(c/x))

________________________________________________________________________________________

Giac [A]  time = 1.12084, size = 36, normalized size = 1.33 \begin{align*} \frac{1}{2} \,{\left (2 \, x \arctan \left (\frac{c}{x}\right ) + c \log \left (c^{2} + x^{2}\right )\right )} b + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctan(c/x),x, algorithm="giac")

[Out]

1/2*(2*x*arctan(c/x) + c*log(c^2 + x^2))*b + a*x